<template>
    <div class="MABody wap">
      <x-header v-if="!this.$fromApp(this)" class="whiteTheme" :left-options="{backText: ''}">营销活动</x-header>
      <ul class="main activityList display-flex align-items-center flex-direction-column">
        <li class="activityItem sendPacket" @click="goSendPacket">
          <span>发红包</span>
        </li>
        <li class="activityItem giftGiving" @click="goGiftGiving">
          <span>搭赠</span>
        </li>
        <li class="activityItem specialOffer" @click="goSpecialOffer">
          <span>特价抢购</span>
        </li>
      </ul>
    </div>
</template>

<script>
    export default {
        name: "marketingActivities",
        methods:{
            goSendPacket(){
              if(this.$fromApp(this)){
                this.$callJava({url:this.$webUrl+"MarketingActivities/RedPacketList?from=app",title:"红包列表"})
              }else{
                this.$router.push('/MarketingActivities/RedPacketList')
              }
            },
            goGiftGiving(){
              if(this.$fromApp(this)){
                this.$callJava({url:this.$webUrl+"MarketingActivities/GiftGiveList?from=app",title:"搭赠列表"})
              }else{
                this.$router.push('/MarketingActivities/GiftGiveList')
              }
            },
            goSpecialOffer(){
              if(this.$fromApp(this)){
                this.$callJava({url:this.$webUrl+"MarketingActivities/SpecialOfferList?from=app",title:"特价列表"})
              }else{
                this.$router.push('/MarketingActivities/SpecialOfferList')
              }
            }
        }
    }
</script>

<style lang="less" type="text/less" scoped>
  ul>li{
    list-style: none;
  }
.MABody{
  background-color: #ffffff;
  .activityList{
    margin-top: .8rem;
    .activityItem{
      position: relative;
      width: 6.5rem;
      height: 2.6rem;
      margin-top: .2rem;
      span{
        position: absolute;
        top: .5rem;
        left: .8rem;
        color: #FFFFFF;
        font-size: 23px;
      }
    }
    .sendPacket{
      background: url("../../../assets/img/order/fhb.png") no-repeat center;
      background-size: 100% 100%;
    }
    .giftGiving{
      background: url("../../../assets/img/order/dz.png") no-repeat center;
      background-size: 100% 100%;
    }
    .specialOffer{
      background: url("../../../assets/img/order/tjqg.png") no-repeat center;
      background-size: 100% 100%;
    }
  }
}
</style>
